//
// Created by xili on 2024/8/13 20:43.
// GO BIG OR GO HOME.
//
#include "leetcode.h"

class Solution {
public:
    int findNonMinOrMax(vector<int> &nums) {
        int n = nums.size();
        if (n < 3) {
            return -1;
        }
        sort(nums.begin(), nums.begin() + 3);
        return nums[1];
    }
};